package com.iflytek.exam.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.iflytek.exam.mapper.JudgeMapper;
import com.iflytek.exam.domain.Judge;
import com.iflytek.exam.service.IJudgeService;

/**
 * 判断题Service业务层处理
 *
 * @author Dogdog
 * @date 2024-07-07
 */
@Service
public class JudgeServiceImpl implements IJudgeService
{
    @Autowired
    private JudgeMapper judgeMapper;

    /**
     * 查询判断题
     *
     * @param id 判断题主键
     * @return 判断题
     */
    @Override
    public Judge selectJudgeById(Long id)
    {
        return judgeMapper.selectJudgeById(id);
    }

    @Override
    public Judge selectJudgeByTitle(String title) {
        return judgeMapper.selectJudgeByTitle(title);
    }

    /**
     * 查询判断题列表
     *
     * @param judge 判断题
     * @return 判断题
     */
    @Override
    public List<Judge> selectJudgeList(Judge judge)
    {
        return judgeMapper.selectJudgeList(judge);
    }

    /**
     * 新增判断题
     *
     * @param judge 判断题
     * @return 结果
     */
    @Override
    public int insertJudge(Judge judge)
    {
        return judgeMapper.insertJudge(judge);
    }

    /**
     * 修改判断题
     *
     * @param judge 判断题
     * @return 结果
     */
    @Override
    public int updateJudge(Judge judge)
    {
        return judgeMapper.updateJudge(judge);
    }

    /**
     * 批量删除判断题
     *
     * @param ids 需要删除的判断题主键
     * @return 结果
     */
    @Override
    public int deleteJudgeByIds(Long[] ids)
    {
        return judgeMapper.deleteJudgeByIds(ids);
    }

    /**
     * 删除判断题信息
     *
     * @param id 判断题主键
     * @return 结果
     */
    @Override
    public int deleteJudgeById(Long id)
    {
        return judgeMapper.deleteJudgeById(id);
    }

    @Override
    public Long[] getAllJudgeIds(long quBankId) {
        return judgeMapper.getAllJudgeIds(quBankId);
    }
}
